Fix spurious blank page in Typst when using raw set page rule#14219
Merged
gordonwoodhull merged 1 commit intomainfrom Mar 19, 2026
Merged
Fix spurious blank page in Typst when using raw set page rule#14219gordonwoodhull merged 1 commit intomainfrom
gordonwoodhull merged 1 commit intomainfrom
Conversation
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
Author
|
The individual What changed is that the Pandoc merge ( That outer wrapper emits content even when all the inner guards are false, which is what triggers the page break. Our fix just adds the missing guard on that outer wrapper. |
Collaborator
|
Fixed upstream in pandoc already: jgm/pandoc@dc4bcd2 |
37e28e8 to
0429d9e
Compare
When a document has no title, authors, date, or abstract, the article() template unconditionally emitted a place(top, float: true, ...) with an empty block. This counted as content, so a subsequent raw #set page(...) in the document body triggered a page break in Typst, producing a blank first page. Guard the place() call so it is only emitted when there is actual title block content. Fixes #14217
0429d9e to
d1c39cf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unfortunately it means changing the indentation on most of the template yet again, but we have
git diff -wSummary
place(top, float: true, ...)title block in the Typstarticle()template when there is no title, authors, date, or abstract#set page(...)in the document body triggered a page break in Typst, producing a spurious blank first pageFixes #14217
Test plan
tests/docs/smoke-all/typst/raw-set-page-no-extra-page.qmdasserts body content is on page 1